/* 标题栏 */
header.top {
	padding: 20px 5%;
	margin: auto;
	max-width: 1120px;
	display: flex;
	justify-content: space-between;
	position: sticky;
	top: 0;
	background-color: rgba(240,240,240,1);
	z-index: 10;
	box-shadow: 0px 6px 7px 0px rgba(240,240,240,1);
}
.top-title {
	font-family: "Sofia";
	color: rgba(43,63,80,1);
	font-size: 32px;
	line-height: 36px;
	cursor: pointer;
	-webkit-user-select: none;
	-moz-user-select: none;
	-o-user-select: none;
	user-select: none;
	transition: 0.4s all;
}
.top-title:hover {
	text-shadow: 5px 4px 3px rgba(128,128,128,0.95);
}
.top-title:active {
	transform: scale(0.9);
	opacity: 0.75;
}
header.top input[type="button"],
header.top button {
	margin: auto 0;
	font-size: 16px;
	min-width: 80px;
	border: none;
	font-weight: bold;
	transition: 0.25s transform;
}
header.top input[type="button"]:active,
header.top button:active {
	transform: scale(0.85);
}

/* 卡牌生成区域 */
.container {
	margin: auto;
	max-width: 1120px;
	min-height: 180px;
	padding: 10px;
	border-radius: 20px;
	transition: 0.5s;
}

.cards-list {
	display: flex;
	justify-content: space-evenly;
	flex-wrap: wrap;
}
.card {
	display: flex;
	width: 120px;
	height: 160px;
	background-size: cover;
	background-position: center;
	border-radius: 15px;
	box-sizing: border-box;
	margin: 10px;
	overflow: hidden;
	position: relative;
	transition: 0.25s;
	box-shadow: 0px 0px 1px 1px rgba(0,0,0,0.2);
	animation: 1s card-show;
}
.card-hide {
	background-color: rgba(165,173,190,1);
	cursor: pointer;
}
.card-show {
	background-color: rgba(165,173,180,0.25);
	cursor: default;
}

@keyframes card-show {
	from {
		transform: scale(0);
		opacity: 0;
	} to {
		transform: scale(1);
		opacity: 1;
	}
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0px 5px 5px 0px rgba(0,0,0,0.25);
}
.card img {
	display: block;
	margin: auto;
	width: 100%;
	transition: 0.25s;
	animation: 1s card-show;
	border-radius: 15px;
	font-size: 14px;
	color: grey;
}

/* 已匹配卡牌时的显示效果 */
.bingo {
	background-color: rgba(255,192,203,0.5);
}

/* 难度选择 */
.game-operation {
	padding: 20px 0;
	transition: 0.5s;
}
.game-operation::before {
	content: attr(data-tip);
	display: block;
	text-align: center;
	font-size: 20px;
	color: coral;
}
.content-input {
	width: 90%;
	max-width: 360px;
	margin: 15px auto;
	display: flex;
	justify-content: space-between;
}
.content-input::after {
	content: attr(data-difficulty);
	display: block;
	max-height: 100%;
	line-height: 40px;
	font-size: 24px;
	font-weight: bold;
	color: cornflowerblue;
	padding-left: 20px;
}
.content-input .el-slider {
	width: 100%;
}

.start-game {
	padding: 18px 50px;
	position: relative;
	background-image: linear-gradient(315deg, #89d8d3 0%, #03c8a8 74%);
	overflow: hidden;
	display: block;
	margin: auto;
	border: none;
	border-radius: 38px;
	font-weight: bold;
	min-height: 40px;
	transition: 0.25s;
	box-shadow: inset 2px 2px 2px 0px rgb(255 255 255 / 50%),
		7px 7px 20px 0px rgb(0 0 0 / 10%),
		4px 4px 5px 0px rgb(0 0 0 / 10%);
	z-index: 1;
}
.start-game::before {
	content: attr(data-text);
	color: white;
	font-size: 26px;
	line-height: 30px;
}
.start-game::after {
	position: absolute;
	content: "";
	width: 100%;
	height: 0;
	bottom: 0;
	left: 0;
	z-index: -1;
	border-radius: 5px;
	background-color: #4dccc6;
	background-image: linear-gradient(315deg, #4dccc6 0%, #96e4df 74%);
	box-shadow: -7px -7px 20px 0px #fff9,
		-4px -4px 5px 0px #fff9,
		7px 7px 20px 0px #0002,
		4px 4px 5px 0px #0001;
	transition: all 0.3s ease;
}
.start-game:active {
	transform: scale(1.05);
}
.start-game:hover::after {
	top: 0;
	height: 100%;
}

/* 设置 */
.settings-items {
	--control-height: 40px;
	--default-width: 80px;
}
.settings-items li {
	border-bottom: rgba(128,128,128,0.5) dashed 1px;
	padding: 12px 2%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-radius: 10px 10px 0 0;
	transition: 0.2s all;
}
.settings-items li::before {
	content: attr(data-title);
	display: flex;
	max-width: 50%;
	color: rgba(128,128,128,1);
	font-size: 16px;
	align-items: center;
}
.settings-items li:hover {
	background-color: rgba(200,200,200,0.2);
}
.settings-items li .el-slider {
	width: 36%;
	margin-right: 10px;
}
.reset-game {
	display: block;
	background-color: rgba(40,162,255,1);
	min-width: var(--default-width);
	height: var(--control-height);
	border: none;
	border-radius: calc(var(--control-height) / 2);
	color: white;
	padding: 0 calc(var(--control-height) / 1.5);
	font-size: 16px;
	font-weight: bold;
	transition: 0.5s box-shadow, 0.25s transform;
}
.reset-game:hover {
	box-shadow: 0px 0px 12px 2px rgba(40,162,255,75%);
}
.reset-game:active {
	transform: scale(0.8);
}
/* 开关按钮 */
input[type="checkbox"].switch {
	display: none;
}
label.switch {
	cursor: pointer;
	width: var(--default-width);
	height: var(--control-height);
	position: relative;
	overflow: hidden;
	background-color: rgba(229,229,229,1);
	border-radius: calc(var(--control-height) / 2);
	transition: 0.4s all;
}
label.switch::before {
	content: '';
	display: block;
	position: absolute;
	margin: auto;
	top: 0;
	bottom: 0;
	left: calc(var(--default-width) * 0.75 * 0.1);
	width: calc(var(--control-height) * 0.75);
	height: calc(var(--control-height) * 0.75);
	transition: 0.4s all;
	border-radius: 50%;
	background-color: white;
	box-sizing: border-box;
	border: rgba(128,128,128,0.5) solid 1px;
}
input[type="checkbox"].switch:checked + label.switch {
	/* background-color: rgba(245,113,195,1); */
	background-color: rgba(30,200,150,1);
}
input[type="checkbox"].switch:checked + label.switch::before {
	left: calc(var(--default-width) * 0.75 * 0.75);
	border: rgba(128,128,128,0) solid 1px;
}
label.switch:active::before {
	transform: scale(0.75);
}

/* 媒体查询 */
@keyframes light {
	0% {
		left: -10%;
	} 50% {
		left: 110%;
	} 100% {
		left: 110%;
	}
}
@media screen and (max-width: 1160px) {
	.container {
		border: rgba(102,102,102,0) solid 6px;
	}
}
@media screen and (max-width: 468px) {
	.card {
		width: 96px;
		height: 128px;
	}
}
@media screen and (max-width: 380px) {
	.card {
		width: 72px;
		height: 96px;
	}
}
@media screen and (max-width: 216px) {
	.card {
		width: 45px;
		height: 60px;
	}
}